Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Universal Assisted Model #90

Merged
merged 20 commits into from
Nov 12, 2024
Merged

Conversation

cheungdaven
Copy link
Collaborator

@cheungdaven cheungdaven commented Nov 2, 2024

Description

[Provide a brief description of the changes in this PR]
PR to support universal assisted model, see https://huggingface.co/docs/transformers/main/en/generation_strategies#universal-assisted-decoding for more details.

Related Issue

[Link to the related issue, if applicable]

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My code follows the project's coding style
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly
  • I have added appropriate comments to my code, particularly in hard-to-understand areas

Additional Information

[Any additional information, configuration, or data that might be necessary to reproduce the issue or test the PR]

Screenshots (if appropriate)

[Add screenshots to help explain your changes]

Performance Impact

[Describe any performance impact this change may have]

Backwards Compatibility

[Describe any backwards incompatible changes and how you've addressed them]

Dependency Changes

[List any new dependencies introduced or removed]

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

github-actions bot commented Nov 2, 2024

Job PR-90-252636c is done.
Docs are uploaded to https://d1at46xkvcde0c.cloudfront.net/PR-90/252636c/index.html

Copy link
Collaborator

@shreyash2106 shreyash2106 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sorry for the delayed review.

if self.assistant_tokenizer_name:
assistant_tokenizer = AutoTokenizer.from_pretrained(self.assistant_tokenizer_name)
self.hf_generate_params["assistant_tokenizer"] = assistant_tokenizer
self.hf_generate_params["tokenizer"] = self.tokenizer
Copy link
Collaborator

@suzhoum suzhoum Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be more logical to move Line 93 out of the if statement and place after Line 81?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line is usually not needed, but it is compulsory if there is an assistant tokenizer.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK that makes sense.

Copy link
Collaborator

@suzhoum suzhoum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cheungdaven cheungdaven merged commit 1054fd2 into autogluon:main Nov 12, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants